import axios, { type AxiosRequestConfig } from "axios"

const request = axios.create({
  baseURL: "/dev", // 基础路径
  timeout: 50000 // 超时时间
})

request.interceptors.request.use(function (config: AxiosRequestConfig) {
  return config;
}, function (error) {
  return Promise.reject(error);
});


request.interceptors.response.use(function (response) {
  return response;
}, function (error) {
  return Promise.reject(error);
});

export default request